package com.cx.service.Impl;

import com.cx.entity.Book;
import com.cx.mapper.BookMapper;
import com.cx.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
@Service
public class BookServiceImpl implements BookService {
@Autowired
private BookMapper bookMapper;
    @Override
    public List<Book> selectAllBook() {
        return bookMapper.selectAllBook();
    }

    @Override
    public Book selectBookById(int bookId) {
        return bookMapper.selectBookById(bookId);
    }

    @Override
    public int deleteDept(int bookId) {
        return bookMapper.deleteDept(bookId);
    }

    @Override
    public int updateDept(Book book) {
        return bookMapper.updateDept(book);
    }

    @Override
    public int insertDept(Book book) {
        return bookMapper.insertDept(book);
    }
}
